Red Hat Enterprise Linux 6 Administration by Sander van Vugt

Red Hat Enterprise Linux 6 Administration by Sander van Vugt

Author:Sander van Vugt
Language: eng
Format: epub
Publisher: John Wiley & Sons
Published: 2013-01-14T16:00:00+00:00


Managing Linux Users and Groups in LDAP

In this section, you'll learn how to manage Linux user and group accounts in an LDAP Directory. You'll learn how to add users and groups, how to set passwords for LDAP users, and how to change the group membership for users. You'll also learn how to delete entries from the LDAP Directory.

Adding LDAP Users

To add anything to an LDAP Directory, you need to create an LDIF file. This file needs to contain definitions for all attributes that are required for the entries you want to create. Once the LDIF file is created, you can use ldapadd to import it into the Directory. In Listing 12.5, you can see what an LDIF file designed to import user accounts into the Directory looks like.

Listing 12.5: LDIF file for user import

[root@hnl ~]# cat lisa.ldif dn: uid=lisa,ou=users,dc=example,dc=com objectClass: top objectClass: account objectClass: posixAccount objectClass: shadowAccount cn: lisa uid: lisa uidNumber: 5000 gidNumber: 5000 homeDirectory: /home/lisa loginShell: /bin/bash gecos: lisa userPassword: {crypt}x shadowLastChange: 0 shadowMax: 0 shadowWarning: 0 [root@hnl ~]#



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.